﻿using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using netDxf;
using TestDxfDocument.toolingsystem;

namespace TestDxfDocument
{
    public class Program
    {

        // 声明调用API方法
        [DllImport("kernel32.dll")]
        private static extern bool AllocConsole();
        public static void Main()
        {
            #region 测试方法
            AllocConsole();
            Dictionary<string, Object> data = new Dictionary<string, object>();

            //data = SocketServer.jsonData("{\"idofframe\":\"\",\"isframe_chose\":\"4Y\",\"drawnum\":\"(图样代号)\",\"lu\":\"26\",\"scale\":\"5\",\"nameofframe\":\"\",\"drawname\":\"(图样名称)\",\"fs\":\"3\",\"drvsc\":\"3.6\",\"dconms\":\"4\", \"unitname\":\"(单位名称)\",\"oal\":\"44\",\"tcl\":\"2\",\"drawdesc\":\"\",\"h\":\"0.866025\",\"drvl\":\"4\",\"an\":\"0\",\"ap\":\"0\",\"td\":\"6\",\"name\":\"StraightFluteTap1\",\"thl\":\"16\",\"tecreq\":\"\",\"tp\":\"1\",\"isframe\":\"0\",\"rp\":\"5\"}");

            //data.Add("path", "C:\\Users\\17464\\Desktop\\ego\\1.dxf");
            //StraightFluteTapClass.StraightFluteTap1(data);


            //data.Add("path", "E:\\工作\\1.dxf");
            //_ToolholderswithrectangularshankforindexableinsertsA.ToolholderswithrectangularshankforindexableinsertsA(data);


            //data.Add("path", "C:\\Users\\17464\\Desktop\\ego\\1.dxf");
            //TestX.Test(data);


            SocketServer server = new SocketServer(6000);
            server.StartListen();

            //System.Diagnostics.Debug.WriteLine(Math.Round(3.1415926, 0));//打印
            //class_ISYC_307_05.ISYC_307_F73(data);
            //ISYC_314_01_F141.ISYC_314_01_F141_H(data);
            //ISYC_307_13_F81.ISYC_307_F81(data);
            //ISYC_303_F34a.ISYC_303_34a(data);
            //ISYC_201_08_H8.ISYC_201_08(data);
            //class_ISYC_201_10.ISYC_201_10(data);
            //>>>>>>> d4473e8253c261aab72bd73583b2d4d65ae71163

            #endregion
            //  double d = 1525.325;
            //  int i = (int)d;
            //  System.Diagnostics.Debug.WriteLine(i);//打印

            //System.Diagnostics.Debug.WriteLine(Math.Round(3.1415926, 0.));//打印
            //SocketServer server = new SocketServer(6000);
            //server.StartListen();
            //System.Diagnostics.Debug.WriteLine(Math.Round(3.1415926, 0));//打印


            //Turningtoolswithcarbidetips8._Turningtoolswithcarbidetips8(data);

            // SocketServer server = new SocketServer(6000);
            // server.StartListen();


            //测试数据是否可以生成dxf文件，请勿删除
            //String str = "";
            //SocketServer.CreateDxf(SocketServer.jsonData(str));
        }
    }
}